Benjamin Otte [Sat, 26 Mar 2011 22:33:39 +0000 (23:33 +0100)]
widget: Create the widget's style lazily
That way we don't have to update the style's colors all the time on
theme changes when the widget is not actually using GtkStyle.
Benjamin Otte [Sat, 26 Mar 2011 20:55:35 +0000 (21:55 +0100)]
widget: Don't call gtk_style_attach() and gtk_style_detach() anymore
Benjamin Otte [Sat, 26 Mar 2011 20:46:50 +0000 (21:46 +0100)]
docs: Make clear that gtk_widget_set_style() does not do anything
Benjamin Otte [Sat, 26 Mar 2011 20:45:32 +0000 (21:45 +0100)]
widget: Use a priv variable
Benjamin Otte [Sat, 26 Mar 2011 20:42:41 +0000 (21:42 +0100)]
widget: Widgets always have a style, so no need to check for NULL
Benjamin Otte [Sat, 26 Mar 2011 18:22:31 +0000 (19:22 +0100)]
combobox: Don't set the menu's name twice
Benjamin Otte [Sat, 26 Mar 2011 16:00:36 +0000 (17:00 +0100)]
notebook: Only reset style on tab labels when it actually changes
Benjamin Otte [Sat, 26 Mar 2011 15:07:54 +0000 (16:07 +0100)]
widget: Reshuffle code for style context getter
The intention of this patch is to make the code clearer, shorter and
most of all to avoid recreating the widget path and setting it path
twice on the style context when the style context was recreated.
Benjamin Otte [Sat, 26 Mar 2011 14:22:11 +0000 (15:22 +0100)]
widget: Don't create the style context if not necessary
If all we want to do is update the context's screen, we don't need to
create it if it doesn't exist yet.
Benjamin Otte [Sat, 26 Mar 2011 22:52:28 +0000 (23:52 +0100)]
Revert "Ensure GtkWidget::style-updated is emitted before first size negociation"
This reverts commit
b7f772eb93e8615ebf14f5bdde33bc59dd0b11bf.
The commit just poked around things and added lots of workarounds
instead of actually fixing the bug it set out to fix.
See https://bugzilla.gnome.org/show_bug.cgi?id=639584 for details.
Benjamin Otte [Sat, 26 Mar 2011 13:49:24 +0000 (14:49 +0100)]
gtk: Reset children styles when changing name
Changing the name of a widget does not just change the current widget's
path, but also the path of all its children.
Benjamin Otte [Sat, 26 Mar 2011 13:44:12 +0000 (14:44 +0100)]
widgetpath: Sanitize pos argument for iters correctly
The comparison done was off by one and would have caused invalid
reads or writes.
Benjamin Otte [Sat, 19 Feb 2011 19:45:54 +0000 (20:45 +0100)]
dnd: Use G_N_ELEMENTS()
Now that we have wesome macros in glib 2.0, we can use them. Woohoo, GTK
2.0 will be so awesome in the future.
(Did anybody touch dnd code this millenium?)
Claude Paroz [Sat, 26 Mar 2011 16:14:41 +0000 (17:14 +0100)]
Updated French translation of po-properties
Contributed by Gérard Baylard, Bruno Brouard and Claude Paroz
Daniel Nylander [Sat, 26 Mar 2011 09:29:53 +0000 (10:29 +0100)]
Updated Swedish translation
Chun-wei Fan [Sat, 26 Mar 2011 03:49:53 +0000 (11:49 +0800)]
Update VS property sheet
Make GDK-Pixbuf include path more consitent with autofiscated builds
Tristan Van Berkom [Sun, 6 Mar 2011 08:13:32 +0000 (17:13 +0900)]
Fixed possible segmentation fault while freeing size request caches.
Tristan Van Berkom [Sun, 6 Mar 2011 06:13:56 +0000 (15:13 +0900)]
Cache heights-for-range-of-widths instead of height for every width.
This patch optimizes window resizes by assuming that if a widget
has the same height at a width of 50 as with a width of 150, the
height for width 100 will also be the same.
The patch also further optimizes the cache allocator, now there
are 2 pointer arrays of up to a maximum of 5 requests, the arrays
will only be allocated if a request is ever made in that orientation
and the array will be sparse until each request is made (i.e. if a
label can only wrap to 3 lines, there will only be 3 out of a
possible 5 SizeRequest structures allocated to cache it).
Tristan Van Berkom [Sat, 5 Mar 2011 10:29:10 +0000 (19:29 +0900)]
Reduce memory consumption of the size request cache.
This patch makes contextual height-for-width request caching
optional (the contextual cache is not allocated for widgets that
report GTK_SIZE_REQUEST_CONSTANT_SIZE).
Tristan Van Berkom [Sat, 5 Mar 2011 08:49:49 +0000 (17:49 +0900)]
Added GTK_SIZE_REQUEST_CONSTANT_SIZE to GtkSizeRequestMode
The constant size request mode defines a request mode where
height-for-width geometry is unneeded, thus optimizing GTK+
by reducing the overall amount of requests that need to be
performed and cached while resizing an interface.
Daniel Nylander [Fri, 25 Mar 2011 21:30:29 +0000 (22:30 +0100)]
Updated Swedish translation
Alexander Shopov [Fri, 25 Mar 2011 20:28:19 +0000 (22:28 +0200)]
Updated Bulgarian translation
Florian Müllner [Fri, 25 Mar 2011 14:46:41 +0000 (15:46 +0100)]
window: Use settings from screen rather than default
gtk_settings_get_default() was used to monitor the
"gtk-application-prefers-dark-theme" setting, rather
than the GtkSettings object associated with the window's
screen.
Carlos Garnacho [Thu, 24 Mar 2011 23:31:46 +0000 (00:31 +0100)]
Ensure GtkWidget::style-updated is emitted before first size negociation
Fixes Bug 639584 - initial emission of GtkWidget:style-set is
not happening.
GtkWidget was filtering out ::style-updated (and ::style-set)
emissions until the widget was realized in order to avoid often
useless updates during widget construction and placing.
This is now done instead until the widget has a parent/screen,
which ensures the initial emission happen prior to the first
size negociation, while still filtering out all early emissions
during construction.
Changwoo Ryu [Fri, 25 Mar 2011 13:01:43 +0000 (22:01 +0900)]
Updated Korean translation
Friedel Wolff [Thu, 24 Mar 2011 21:13:33 +0000 (23:13 +0200)]
Update translation for Afrikaans (af)
Matthias Clasen [Thu, 24 Mar 2011 16:44:03 +0000 (12:44 -0400)]
Make selectable labels work again
You can select something, but moving the focus somewhere else, or bringing up
the context menu makes the selection go away. This makes it impossible to
copy-paste the text.
The reason for this regression is that gtk_label_state_changed was sloppy and
assumed that it would only ever be called when a labels goes insensitive, which
is no longer the case.
The patch fixes things by explicitly checking if the widget is insensitive, and
only resetting the selection in that case, which is the same behaviour we have
for e.g. GtkEntry.
Aron Xu [Thu, 24 Mar 2011 16:36:19 +0000 (16:36 +0000)]
Merge Simplified Chinese translation from branch gtk-3-0.
Cosimo Cecchi [Tue, 22 Mar 2011 18:53:21 +0000 (14:53 -0400)]
switch: hardcode a smaller font size for the switch label
This should not really be done here, but we can't override font size
from the theme just yet.
https://bugzilla.gnome.org/show_bug.cgi?id=645458
Cosimo Cecchi [Tue, 22 Mar 2011 18:51:06 +0000 (14:51 -0400)]
gtksettings: unset attributes set to normal from font description
So that they do not override values coming from the theme.
Based on a patch by Carlos Garnacho.
https://bugzilla.gnome.org/show_bug.cgi?id=645458
Cosimo Cecchi [Tue, 22 Mar 2011 18:35:23 +0000 (14:35 -0400)]
Revert "styleproperties: don't force replacing the font description"
It turns out the bug is more complicated than I originally understood.
Not replacing the font description fields while merging here makes it
impossible for application's CSS to override fonts.
This reverts commit
89c1d93b68aaaebeb5db0dc2a58895721c6665aa.
https://bugzilla.gnome.org/show_bug.cgi?id=645458
Olav Vitters [Wed, 23 Mar 2011 10:54:36 +0000 (11:54 +0100)]
Add DOAP file
Carlos Garcia Campos [Tue, 22 Mar 2011 11:47:50 +0000 (12:47 +0100)]
gtk-demo: Add placeholder text to search entry demo
Michael Natterer [Mon, 21 Mar 2011 19:58:40 +0000 (20:58 +0100)]
configure: bump version to 3.1.0
Michael Natterer [Mon, 21 Mar 2011 19:57:43 +0000 (20:57 +0100)]
Bug 643805 - Allow GtkExpander to resize the toplevel upon expanding/collpasing
Add gtk_expander_get,set_resize_toplevel() and a "resize-toplevel"
property.
Marek Kasik [Fri, 19 Nov 2010 09:55:25 +0000 (10:55 +0100)]
Check whether a resolution has been set in GtkPrintSettings
If resolution has not been set then use default resolution from ppd.
https://bugzilla.gnome.org/show_bug.cgi?id=635254
Cosimo Cecchi [Mon, 21 Mar 2011 14:53:12 +0000 (10:53 -0400)]
themingengine: don't hardcode white to draw insensitive labels shadow
Use the background color instead.
I think the optimal solution would be delegating the shadow rendering to
the theme completely, and removing this in GtkThemingEngine, but for
now, this simple fix makes the dark variant more usable.
https://bugzilla.gnome.org/show_bug.cgi?id=645405
Cosimo Cecchi [Fri, 18 Mar 2011 20:28:11 +0000 (16:28 -0400)]
filechooserdefault: fix a build warning
Garrett Regier [Sat, 19 Mar 2011 16:09:27 +0000 (09:09 -0700)]
Fix leaking calls to gdk_device_manager_list_devices()
gdk_device_manager_list_devices() returns a newly allocated list.
https://bugzilla.gnome.org/show_bug.cgi?id=645234
Matthias Clasen [Mon, 21 Mar 2011 14:32:49 +0000 (10:32 -0400)]
Fix portability issues in configure
Avoid using bash features unnecessarily.
Patch by Matteo Settenvini
https://bugzilla.gnome.org/show_bug.cgi?id=645057
Garrett Regier [Sat, 19 Mar 2011 16:11:45 +0000 (09:11 -0700)]
Free the motion hint infos in GdkDisplay
https://bugzilla.gnome.org/show_bug.cgi?id=645235
Florian Müllner [Sun, 20 Mar 2011 13:37:27 +0000 (14:37 +0100)]
window: Export theme variant to X11
The metacity theme format allows to use colors from the current
GTK+ theme in window decorations. Since GTK+ now gained support
for dark theme variants, window managers using that theme format
(metacity, mutter, compiz via gtk-window-decorator) should be able
to use colors from the correct variant; so in case a variant is
requested, export it in the _GTK_THEME_VARIANT property on
toplevel windows.
https://bugzilla.gnome.org/show_bug.cgi?id=645354
Gintautas Miliauskas [Mon, 21 Mar 2011 13:28:19 +0000 (14:28 +0100)]
Updated Lithuanian translation.
Carlos Garcia Campos [Wed, 2 Mar 2011 17:17:05 +0000 (18:17 +0100)]
gail: Implement AtkObject::get_attributes() in GailEntry
And return the GtkEntry placeholder text as a new attribute.
https://bugzilla.gnome.org/show_bug.cgi?id=440963
Carlos Garcia Campos [Thu, 24 Feb 2011 12:29:10 +0000 (13:29 +0100)]
gtkentry: Add hinting to GtkEntry
gtk_entry_set_placeholder_text() makes the entry display the given text
when it is empty and unfocused. Based on previous patch by Alberto
Garcia.
https://bugzilla.gnome.org/show_bug.cgi?id=440963
Amitakhya Phukan [Mon, 21 Mar 2011 07:28:18 +0000 (12:58 +0530)]
Updated Assamese translations
Amitakhya Phukan [Mon, 21 Mar 2011 07:27:50 +0000 (12:57 +0530)]
Updated Assamese translations
Andika Triwidada [Mon, 21 Mar 2011 04:17:08 +0000 (11:17 +0700)]
Updated Indonesian translation of gtk+ properties
Gabor Kelemen [Sat, 19 Mar 2011 22:45:36 +0000 (23:45 +0100)]
Updated Hungarian translation
Wouter Bolsterlee [Sat, 19 Mar 2011 16:58:06 +0000 (17:58 +0100)]
Updated Dutch translation by Wouter Bolsterlee
Cosimo Cecchi [Fri, 18 Mar 2011 19:14:25 +0000 (15:14 -0400)]
radiobutton: exclude states we set manually from the previous state
https://bugzilla.gnome.org/show_bug.cgi?id=645172
Cosimo Cecchi [Fri, 18 Mar 2011 19:00:11 +0000 (15:00 -0400)]
radiobutton: build the new state flags from the previous flags on click
This fixes e.g. sensitivity issues with GtkRadioButton on state update.
https://bugzilla.gnome.org/show_bug.cgi?id=645172
Benjamin Otte [Mon, 14 Feb 2011 18:10:39 +0000 (19:10 +0100)]
gtk: Make region argument to gtk_widget_queue_draw_region() const
Cosimo Cecchi [Thu, 17 Mar 2011 22:27:03 +0000 (18:27 -0400)]
switch: fix boundaries for the switch motion
We were ignoring the focus ring padding, and we were incorrectly setting
handle_x to padding.left, while the draw handler already takes padding
into account while redrawing.
https://bugzilla.gnome.org/show_bug.cgi?id=645134
Cosimo Cecchi [Thu, 17 Mar 2011 21:26:15 +0000 (17:26 -0400)]
notebook: don't forget to reset the style after setting show-tabs
This fixes a regression after commit
b04f4c536aeab4281a9f0117e67accae19d691b9
Dan Winship [Tue, 15 Mar 2011 16:25:36 +0000 (12:25 -0400)]
GdkDeviceManagerXI2: process send_event core events
XSendEvent doesn't currently work with XI2 events, so add code to
translate core events when they have the send_event flag.
(We still don't actually select for core pointer/keyboard events, so
we will only receive send_event events that are sent with a 0
event_mask.)
https://bugzilla.gnome.org/show_bug.cgi?id=644847
Cosimo Cecchi [Thu, 17 Mar 2011 21:08:41 +0000 (17:08 -0400)]
treeview: add the separator style class to the tree view separator lines
William Jon McCann [Fri, 28 Jan 2011 03:00:20 +0000 (22:00 -0500)]
filechooser: use the sidebar style class for the file chooser sidebar
https://bugzilla.gnome.org/show_bug.cgi?id=642712
Cosimo Cecchi [Thu, 17 Mar 2011 21:09:05 +0000 (17:09 -0400)]
stylecontext: add a sidebar style class
William Jon McCann [Fri, 28 Jan 2011 02:12:05 +0000 (21:12 -0500)]
set initial pane position
https://bugzilla.gnome.org/show_bug.cgi?id=642712
Cosimo Cecchi [Thu, 17 Mar 2011 19:44:18 +0000 (15:44 -0400)]
filechooser: add the inline-toolbar style class to the bottom toolbar
Cosimo Cecchi [Thu, 17 Mar 2011 19:44:03 +0000 (15:44 -0400)]
stylecontext: add an inline-toolbar style class
Cosimo Cecchi [Thu, 17 Mar 2011 18:31:57 +0000 (14:31 -0400)]
styleproperties: don't force replacing the font description
Otherwise custom fonts will always get overridden by the default stored
in GtkSettings when merging them.
https://bugzilla.gnome.org/show_bug.cgi?id=644975
Bastien Nocera [Thu, 17 Mar 2011 17:59:46 +0000 (17:59 +0000)]
notebook: Don't set notebook style with hidden tabs
When tabs are not shown, and the notebook is used as a container,
we should not set the notebook style, otherwise the theme has no
way to know whether tabs are shown or not, and which colour to draw
the background.
https://bugzilla.gnome.org/show_bug.cgi?id=640692
Benjamin Otte [Thu, 17 Mar 2011 15:45:19 +0000 (16:45 +0100)]
widget: Don't override state data when recursing to children
Writing onto the passed-in GtkStateData could cause changes that would
propagate to siblings, as the data was not reset again.
By copying the data structure, this is avoided and the proper values are
passed to sibling widgets.
Benjamin Otte [Thu, 17 Mar 2011 15:26:50 +0000 (16:26 +0100)]
widget: Fix typo in docs
Frédéric Péters [Thu, 17 Mar 2011 13:40:09 +0000 (14:40 +0100)]
Update properties POTFILES
Bruce Cowan [Thu, 17 Mar 2011 12:50:44 +0000 (12:50 +0000)]
Updated British English properties translation
Benjamin Otte [Thu, 17 Mar 2011 10:55:14 +0000 (11:55 +0100)]
widget: Queue a resize when setting widget to insensitive.
See
015f22777621008dac136940680dff4f250ca42b for details on why this is
necessary.
Benjamin Otte [Tue, 15 Mar 2011 11:20:29 +0000 (12:20 +0100)]
style: Move private function into private header
The function wasn't exported, so everybody using it would have gotten
linking failures.
Benjamin Otte [Tue, 15 Mar 2011 11:16:28 +0000 (12:16 +0100)]
paned: Remove unused variable
Mario Blättermann [Thu, 17 Mar 2011 10:52:54 +0000 (11:52 +0100)]
[l10n] Updated German translation
Jasper St. Pierre [Wed, 16 Mar 2011 23:04:20 +0000 (19:04 -0400)]
Don't only use ch != 0 to check if a character is a control char.
https://bugzilla.gnome.org/show_bug.cgi?id=644976
Jasper St. Pierre [Wed, 16 Mar 2011 23:03:34 +0000 (19:03 -0400)]
gdkkeyuni: Fix DEL for binary search
The list needs to be sorted in order for the binary search to work properly.
https://bugzilla.gnome.org/show_bug.cgi?id=644976
Cosimo Cecchi [Mon, 14 Mar 2011 22:21:47 +0000 (18:21 -0400)]
range: allow stepper-spacing > 0 and trough-under-steppers = TRUE
Commit
4bb3d6441439e4d99255a3a08b39da7100ced953 introduced a limitation
to GtkRange style properties; when stepper-spacing is > 0,
trough-under-steppers is automatically set to FALSE; this means that
setting a spacing between the steppers (e.g. the scrollbar buttons) and
the trough (i.e. the area over which the slider is free to move) would
make the buttons always get the full allocation on the !orientation
direction.
The rationale is without this limitation, you would get an area which
seems clickable, but it's actually not.
While this is true, and undesirable, for big stepper spacings, themes
that use trough-under-steppers (which is TRUE by default anyway),
might want to set smaller spacings to avoid drawing a double line between
the button and the slider borders.
To add confusion, the documentation got it flipped, i.e. it stated
setting a positive stepper-spacing would set trough-under-steppers to
TRUE (which would also make the behavior expected by commit
4bb3d6441439e4d99255a3a08b39da7100ced953 impossible).
I don't think hardcoding either of the two limitations is a good thing.
We should let themes handle this instead, and remove this limitation. If
you want the old behavior, you can manually set trough-under-steppers to
FALSE if you set a positive stepper-spacing in your theme.
https://bugzilla.gnome.org/show_bug.cgi?id=644777
Matthias Clasen [Wed, 16 Mar 2011 16:46:45 +0000 (12:46 -0400)]
Make gdk_keyval_to_unicode return more codes
Previously, we didn't map ASCII controls to their Unicode
counterparts. Fix that.
https://bugzilla.gnome.org/show_bug.cgi?id=644836
Cosimo Cecchi [Wed, 16 Mar 2011 14:50:03 +0000 (10:50 -0400)]
widget: reset widget style after applying style classes from GtkBuilder
Otherwise, the parsed style classes do not get propagated to the
children.
https://bugzilla.gnome.org/show_bug.cgi?id=644925
Cosimo Cecchi [Wed, 16 Mar 2011 14:48:24 +0000 (10:48 -0400)]
broadway: fix a build warning
John (J5) Palmieri [Wed, 16 Mar 2011 14:41:15 +0000 (10:41 -0400)]
[gi] add Virtual annotation for gtk_container_forall vfunc
Fran Diéguez [Tue, 15 Mar 2011 14:53:00 +0000 (15:53 +0100)]
Updated Galician translations
Alexander Larsson [Tue, 15 Mar 2011 12:00:24 +0000 (13:00 +0100)]
Merge branch 'broadway'
Alexander Larsson [Tue, 15 Mar 2011 10:47:38 +0000 (11:47 +0100)]
broadway: Enable TCP_NODELAY for output socket
This makes us send data immediately, giving a much snappier
over-network experience.
Alexander Larsson [Tue, 15 Mar 2011 09:33:08 +0000 (10:33 +0100)]
broadway: Fix up whitespace and indentation for js code
Alexander Larsson [Tue, 15 Mar 2011 09:26:53 +0000 (10:26 +0100)]
broadway: Use camelCase for all js code
Alexander Larsson [Tue, 15 Mar 2011 09:18:07 +0000 (10:18 +0100)]
broadway: Fix flicker when resizing windows
Resizing a canvas causes a clear, so we have to save the previous
content and restore to avoid flickering.
Alexander Larsson [Tue, 15 Mar 2011 08:50:07 +0000 (09:50 +0100)]
broadway: double buffer window updates
Ensure that we're writing all the updates for a single rendering op
in one go without callbacks inbetween. That way some rendering will
be delayed, but the user will never see partial renderings.
Alexander Larsson [Mon, 14 Mar 2011 22:25:36 +0000 (23:25 +0100)]
broadway: Don't crash if output is NULL
Alexander Larsson [Mon, 14 Mar 2011 20:40:59 +0000 (21:40 +0100)]
broadway: Implement gdk_broadway_device_window_at_position
This is required for ungrabs to work properly
Alexander Larsson [Mon, 14 Mar 2011 19:59:28 +0000 (20:59 +0100)]
broadway: Ensure we begin a path when clipping
Alexander Larsson [Mon, 14 Mar 2011 19:59:00 +0000 (20:59 +0100)]
broadway: Do copy rects with compositing mode "copy"
Cosimo Cecchi [Mon, 14 Mar 2011 15:01:43 +0000 (11:01 -0400)]
notebook: make GtkNotebook respect the focus-padding style property
https://bugzilla.gnome.org/show_bug.cgi?id=644348
Alexander Larsson [Mon, 14 Mar 2011 15:38:24 +0000 (16:38 +0100)]
broadway: Fix undefined variable error in js
Alexander Larsson [Mon, 14 Mar 2011 15:04:34 +0000 (16:04 +0100)]
broadway: Start windows transparent rather than black
This avoids flashing
Alexander Larsson [Mon, 14 Mar 2011 14:58:55 +0000 (15:58 +0100)]
broadway: Make broadway port configurable with BROADWAY_DISPLAY
Alexander Larsson [Mon, 14 Mar 2011 14:46:29 +0000 (15:46 +0100)]
broadway: Report right coordinates on ungrab enter
Alexander Larsson [Mon, 14 Mar 2011 14:24:25 +0000 (15:24 +0100)]
broadway: Fix various typos in mouse button event reporting
Alexander Larsson [Mon, 14 Mar 2011 11:13:21 +0000 (12:13 +0100)]
broadway: Fix up grab events, its "mode" not "detail" we send
Alexander Larsson [Mon, 14 Mar 2011 11:09:19 +0000 (12:09 +0100)]
broadway: Track button state
Alexander Larsson [Mon, 14 Mar 2011 11:02:18 +0000 (12:02 +0100)]
broadway: Fix time in ungrab
Alexander Larsson [Mon, 14 Mar 2011 10:46:43 +0000 (11:46 +0100)]
broadway: Implement pointer grabs